import {defineConfig} from 'vite'
import uni from '@dcloudio/vite-plugin-uni'

/**
 * @type {import('vite').UserConfig}
 */
export default defineConfig({
    server: {
        proxy: {
			'/api': {
				target: 'http://127.0.0.1:6065',
				changeOrigin: true,
				rewrite: (path) => path.replace(/^\/api/, '')
			}
		}
    },
    plugins: [
        uni({
            vueOptions: {
                template: {
                    compilerOptions: {
                        isCustomElement: tag => tag.startsWith('iconpark-')
                    }
                }
            }
        }),
    ],
})
